﻿Imports System.ComponentModel

Friend Class OleDBSpecializedConnectionProperties
    Inherits OleDBConnectionProperties
    ' Methods
    Public Sub New(ByVal provider As String)
        Me._provider = provider
        Me.LocalReset()
    End Sub

    Protected Overrides Function GetProperties(ByVal attributes As Attribute()) As PropertyDescriptorCollection
        Dim properties As PropertyDescriptorCollection
        Dim disableProviderSelection As Boolean = MyBase.DisableProviderSelection
        Try
            MyBase.DisableProviderSelection = True
            properties = MyBase.GetProperties(attributes)
        Finally
            MyBase.DisableProviderSelection = disableProviderSelection
        End Try
        Return properties
    End Function

    Private Sub LocalReset()
        Me.Item("Provider") = Me._provider
    End Sub

    Public Overrides Sub Reset()
        MyBase.Reset()
        Me.LocalReset()
    End Sub


    ' Fields
    Private _provider As String
End Class


